<?php
class MediaController extends LBController
{
    protected function needAuth()
    {
        return false;
    }
    
    protected function needTimer()
    {
        return false;
    }

    public function MediaListAction()
    {
        //$this->view->msg = json_encode('');
        $this->render();
    }

    public function RecordAction()
    {
        extract($_POST, EXTR_PREFIX_SAME, "post_");
        var_dump($_POST, $title);
        exit;
        /*
        $filename = '/home/ysq/svn/lb/logs/statistics.txt';
        $somecontent = "$title (id $id): $state ($duration sec.)<br />";

        if (is_writable($filename))
        {
            // In our example we're opening $filename in append mode.   // The file pointer is at the bottom of the file hence   
            // // that's where $somecontent will go when we fwrite() it.  
            if (!$handle = fopen($filename, 'a')) {
                echo "Cannot open file ($filename)";
                exit;
            }
                // Write $somecontent to our opened file.  
            if (fwrite($handle, $somecontent) === FALSE) {
                echo "Cannot write to file ($filename)";
                exit;
            }
            echo "Success, wrote ($somecontent) to file ($filename)";
            fclose($handle);
        }
        else {
            echo "The file $filename is not writable";
        }*/
        $this->render();
    }
}
